/*
 * @Author: HeAo
 * @Date: 2021-09-26 15:21:22
 * @LastEditTime: 2021-09-26 16:19:39
 * @LastEditors: HeAo
 * @Description:
 * @FilePath: \web2103-2105\web2105\3-1-ES6\day02\6-对象API.js
 * 别乱动！
 */
// let name = 'zhangsan'
// let age = 12
// let gender = 'male'

// let obj2 = {
//   name,
//   age,
//   gender
// }
// console.log(obj2);

// console.log(+0 === -0);
// console.log(Object.is(+0, -0));
// console.log(NaN === NaN);
// console.log(Object.is(NaN, NaN));

let obj1 = {}
let obj2 = { name: '张三', age: 12 }
let obj3 = { name: '李四', gender: 'male' }
// Object.assign(obj1, obj2)
// console.log(obj1, obj2);
// console.log(obj1 === obj2);
// Object.assign(obj1, obj2, obj3)
// console.log(obj1);

Object.setPrototypeOf(obj1, obj2)

console.log(obj1.__proto__);
console.log(obj1.constructor.prototype);
console.log(Object.getPrototypeOf(obj1));
